/**
 * 
 */
package lec01.am;

/**
 * @author Administrator
 * 
 */
public class Demo {
	
	public static void main(String[] args) {
	int sum=g(1,100);
	System.out.println(sum);
	}
	/**
	 * 
	 * @param begin
	 * @param end
	 * @return
	 */
	static int g(int a)
	{
		return g(a,100);
	}
	private static int g(int begin, int end) {
		int result = 0;
		for(int k=begin;k<=end;k++)
			result+=k;
		return result;
	}

}
